package com.leo.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName tb_file
 */
@TableName("tb_file")
public class TbFile implements Serializable {
    /**
     * 
     */
    @TableId(type= IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String filename;

    /**
     * 
     */
    private Double filesize;

    /**
     * 
     */
    private String filetype;

    /**
     * 
     */
    private Integer fileid;

    /**
     * 
     */
    private Date createdate;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 
     */
    public String getFilename() {
        return filename;
    }

    /**
     * 
     */
    public void setFilename(String filename) {
        this.filename = filename;
    }

    /**
     * 
     */
    public Double getFilesize() {
        return filesize;
    }

    /**
     * 
     */
    public void setFilesize(Double filesize) {
        this.filesize = filesize;
    }

    /**
     * 
     */
    public String getFiletype() {
        return filetype;
    }

    /**
     * 
     */
    public void setFiletype(String filetype) {
        this.filetype = filetype;
    }

    /**
     * 
     */
    public Integer getFileid() {
        return fileid;
    }

    /**
     * 
     */
    public void setFileid(Integer fileid) {
        this.fileid = fileid;
    }

    /**
     * 
     */
    public Date getCreatedate() {
        return createdate;
    }

    /**
     * 
     */
    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbFile other = (TbFile) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFilename() == null ? other.getFilename() == null : this.getFilename().equals(other.getFilename()))
            && (this.getFilesize() == null ? other.getFilesize() == null : this.getFilesize().equals(other.getFilesize()))
            && (this.getFiletype() == null ? other.getFiletype() == null : this.getFiletype().equals(other.getFiletype()))
            && (this.getFileid() == null ? other.getFileid() == null : this.getFileid().equals(other.getFileid()))
            && (this.getCreatedate() == null ? other.getCreatedate() == null : this.getCreatedate().equals(other.getCreatedate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFilename() == null) ? 0 : getFilename().hashCode());
        result = prime * result + ((getFilesize() == null) ? 0 : getFilesize().hashCode());
        result = prime * result + ((getFiletype() == null) ? 0 : getFiletype().hashCode());
        result = prime * result + ((getFileid() == null) ? 0 : getFileid().hashCode());
        result = prime * result + ((getCreatedate() == null) ? 0 : getCreatedate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", filename=").append(filename);
        sb.append(", filesize=").append(filesize);
        sb.append(", filetype=").append(filetype);
        sb.append(", fileid=").append(fileid);
        sb.append(", createdate=").append(createdate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}